//SPDX-FileCopyrightText: Copyright 2022-2024 深圳市同心圆网络有限公司
//SPDX-License-Identifier: GPL-3.0-only

package user_dao

import "go.mongodb.org/mongo-driver/mongo"

var UserInfoDao *_UserInfoDao
var UserPasswdDao *_UserPasswdDao
var UserSecretDao *_UserSecretDao
var UserNoticeDao *_UserNoticeDao
var UserResumeDao *_UserResumeDao
var ResumeAccessDao *_ResumeAccessDao
var UserMemoDao *_UserMemoDao

func InitDao(mgoDb *mongo.Database) (err error) {
	UserInfoDao, err = newUserInfoDao(mgoDb)
	if err != nil {
		return
	}
	UserPasswdDao, err = newUserPasswdDao(mgoDb)
	if err != nil {
		return
	}
	UserSecretDao, err = newUserSecretDao(mgoDb)
	if err != nil {
		return
	}
	UserNoticeDao, err = newUserNoticeDao(mgoDb)
	if err != nil {
		return
	}
	UserResumeDao, err = newUserResumeDao(mgoDb)
	if err != nil {
		return
	}
	ResumeAccessDao, err = newResumeAccessDao(mgoDb)
	if err != nil {
		return
	}
	UserMemoDao, err = newUserMemoDao(mgoDb)
	if err != nil {
		return
	}
	return
}
